Request a topic or
contact an Arke consultant
404-812-3123
All posts by wayne walton

Arke Systems Blog

Useful technical and business information straight from Arke.

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Archive

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2024

Parsing and Validating Phone Numbers in CRM 2011

First off, I would like to thank Joe Gill for getting me started down the right path.  In fact, I'm going to suggest that everyone click that link so you can use his helpful screenshots to navigate where to put the JS I'm about to post. 

In any case, I had not seen a full example of parsing a phone number in CRM 2011 as I had with CRM 4.0.  Since it is such a common need, I decided to make my own.  The following code will strip out all special characters, check and make sure it's a valid set of numbers, and then push it back to the field, parsed properly.  This is limited to 10-digit phone numbers at the moment, but the core structure should be easily expanded if you need different types of validation.

The nice thing is, this can point at any entity, and any attribute that holds a phone number.  I strongly recommend adding this to your standard JS library for all CRM 2011 projects.

function validatePhone(context)
{

var phone =context.getEventSource().getValue();
var sTmp = phone.replace(/[^0-9]/g, "");
phoneRegex = /^\d{10}$/;

if( !sTmp.match( phoneRegex ) )
   {
   event.returnValue = false;
   alert("Phone must contain 10 numbers.") ;
   }
else
  {
   var sTmpClean =  "(" + sTmp.substr(0, 3) + ") " + sTmp.substr(3, 3) + "-" + sTmp.substr(6, 4);
   context.getEventSource().setValue(sTmpClean);
  }
}


Posted by Wayne Walton on Wednesday, June 22, 2011 4:34 PM
Permalink | Comments (0) | Post RSSRSS comment feed

CRM 2011 - Living in Outlook

Right now, the Microsoft CRM Team is posting videos about CRM 2011.  The most recent one is Living in Outlook.  If you use Outlook and/or CRM at all, prepare to have your mind blown.  The level of integration between CRM 2011 and Outlook is absolutely amazing!  and the best thing is, since it uses Outlook's features to expose CRM data, as Outlook is updated, you get more features in CRM. Of course, that's a double-edged sword.  If you're struck on Outlook 2003, you're not going to get a lot of these cool features, as they disn't exist in Outlook 2003. Here is their full blog post as well: http://blogs.msdn.com/b/crm/archive/2010/10/04/microsoft-dynamics-crm-2011-living-in-outlook.aspx

 
 

Posted by Wayne Walton on Monday, October 4, 2010 4:27 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Internet Explorer 9 Beta and Dynamics CRM

With the release of the Internet Explorer 9 Beta today, I just wanted to make sure that everyone knows not to install IE9 on any machine using CRM Online, CRM 4.0 or testing out the CRM 2011 Beta.  IE9 Beta is currently unsupported for all three CRM environments, and if the IE8 Beta is any indication, it will break things in a big way.

So enjoy testing the Internet Explorer 9 Beta, just don't do it on a machine that uses Dynamics CRM. 


Posted by Wayne Walton on Wednesday, September 15, 2010 12:24 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Update Rollup 12 for Dynamics CRM has been released

First off, here's the Knowledge Base Article and the Download page.

A couple of big issues have been resolved with this update. The first of which is the Email Router Rule Deployment Wizard now supports Exchange 2010.  Also, the Quick Find should be faster, as it no longer occasionally runs the search twice.

For those of you having trouble with Report Wizard Reports, the issue where the error  "Query execution failed for data set DSMain." has been resolved!

A lot of good updates in this Rollup, I highly recommendinstalling it soon.


Posted by Wayne Walton on Tuesday, August 3, 2010 9:38 AM
Permalink | Comments (0) | Post RSSRSS comment feed

The new CRM 4 SDK is out

Just an FYI to anyone not aware, the new CRM 4 SDK has been released.

This one includes full support for LINQ, more support for development in CRM Online, and other goodies. There's also a whole new microsoft.xrm folder with samples and walkthroughs!

The Microsoft Dynamics SDK documentation website hasn't been updated yet, but I'm sure it will soon.


Posted by Wayne Walton on Thursday, May 6, 2010 4:40 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Syncing Arbitrary Contacts from CRM to Outlook

This is a trick I learned at Convergence this year that I really like.  For those of you that weren’t there, I figured I’d document this neat little enhancement to CRM and Outlook.

The end goal here is to allow CRM users to sync up arbitrary contacts to their Outlook, regardless of who may own the Contact.  This can be very useful when you have multiple people work one deal, or when personal and business contacts might overlap.

The first thing to do is create an Entity called Outlook Contact.  Make sure you make it User owned, and the only place it should reside is the Workplace.  Also, it does not need Notes or Activities.  It’s a very simple Entity, and the only thing you’re going to add to it is an N:1 lookup to Contact (make it Parental, there’s no reason to keep the Outlook Contact Entity if the Contact itself is deleted).  Then simplify the form to the point that the only things on it are the Owner and the Outlook Contact to Sync.  Make sure nothing else is Searchable, then publish.  (Don’t forget to set permissions on all roles for Outlook Contact!  By default, roles should be set as User across the board)

 

Next, we need to make the Workflow.  Make it against a Contact, and make it On Demand.  Like the image below:

 

The actual creation of the Outlook Contact Entity is very simple, as pictured below:

 

Once the Workflow is complete and you have Published it, go to your Outlook Client and find the “Modify Local Data Groups” button like in the image below (this part is a per-user setting, so every person that wants to be able to leverage this trick will have to follow these steps):

 

Once in there, you will see a Data Group called “My Contacts”.  I turned it off in my settings, but that’s a personal preference.  If you aren’t familiar, the My Contacts Data Group is the one that syncs all Contacts you own in CRM.

 

You then will want to make a new Data Group and call it “Outlook Contacts Synced”.  Set it up to look like the image below and Save it.

 

Once that is all set up, go to the CRM Contacts list and run the Workflow on any Contacts you want in your Outlook Contacts list.  This will work even on Contacts you don’t own, as long as you have Append To permissions on all Contacts.  To see immediate results, click “Synchronize to CRM” in the CRM menu in Outlook!  Otherwise, they will show up on the normal Outlook/CRM sync schedule.

That’s it; you now have any CRM Contact you want in Outlook (and by extension, your mobile device)!  To remove the Contact, just Delete the Outlook Contact Entity in CRM, and it will be removed on next Sync.

 


Posted by Wayne Walton on Thursday, April 29, 2010 5:26 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Dynamics CRM 5 CTP3 announced!

For those of you like me that have been slavering at the chance to get your hands on CRM5 to see everything they've done with it, CTP3 has been announced!  This isn't a public preview yet (we're still months out, there), but it's a start!

When I get a copy, I'll post about some of the best features from a back-end perspective.  I'm especially interested in the application isolation they've been touting for a while now.  To get a taste of what's been announced so far, hit up this announcement from PDC last year.


Posted by Wayne Walton on Thursday, March 25, 2010 9:54 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Google Maps link in CRM

So I've been looking at a good way to get maps of locations direct from Dynamics CRM.  There are lots of neat solutions out there that embed a Google or Live map directly into a tab, but I didn't want the extra tab.  I wanted something simpler.  So I made this.  It's the simplest solution I could think of that effectively solve the issue.  It literally took more time to think of than to implement.

First,  go to customize the Entity that you want to have the link on.  I chose Account and Address for my implementation, but any entity with an address will do.  So first create an Attribute called Google Maps and put it on the form.  Make sure you give the Attribute a format of URL and increase the maximum length to 500 characters.  This will make it clickable form the UI and ensure you don't cut off the end of the address.

Now go to the Form and go to Form Properties. Open the OnLoad event and paste this JavaScript in:

crmForm.all.new_googlemaps.DataValue = "http://maps.google.com/maps?q=" + crmForm.all.line1.DataValue + "+" + crmForm.all.city.DataValue + "+" + crmForm.all.stateorprovince.DataValue + "+" + crmForm.all.postalcode.DataValue;

A few important things here:   "http://maps.google.com/maps?q=" is the beginning of the Google Maps query string. You need it.  The attributes after that, such as line1, city, etc. are specific to the Address entity.  If you want to do this in a different Entity, you'll have to find out what the specific name of the address, city, state and zip code fields are. also, these instructions are US-oriented.  For international addresses, you'll have to add whatever fields are relevant to get Google Maps to give you correct addresses.

In the end, you'll have a clickable field that will open up a map to the address in CRM in a new browser window. Very convenient, and also compatible with mobile CRM solutions!


Categories: CRM
Posted by Wayne Walton on Friday, May 29, 2009 2:30 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Microsoft Dynamics CRM 4.0 Update Rollup 4 released

Why is seems like just yestarday we were posting about Update Rollup 3, and here comes Rollup 4!

 

You can find the KB article here: http://support.microsoft.com/kb/968176 

The actual files are here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0ddf8e83-5d9c-4fe7-9ae6-f2713a024071#filelist  

Don't forget the updated help files!

One quick addendum, make sure you clear your Internet Explorer cache after installing on both the server and the client side.


Posted by Wayne Walton on Monday, May 11, 2009 2:16 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Microsoft Dynamics CRM 4.0 Update Rollup 3 released

While at Convergence last week, Microsoft went ahead and released Update Rollup 3 for CRM 4.0.  You can get it here.

A few important notes:

  • Importing and exporting customizations is supported between servers with Update Rollup 2 and 3, but not supported between Release, Rollup 1 and Rollup 3. 
  • The CRM for Outlook Client has some memory usage issues resolved.
  • Performance issues with CRM related to the email router have been resolved.

Categories: CRM
Posted by Wayne Walton on Tuesday, March 17, 2009 10:26 AM
Permalink | Comments (0) | Post RSSRSS comment feed